home *** CD-ROM | disk | FTP | other *** search
/ Oz - The Magical Adventure / Adventure.iso / pc / dkdata / itchybugs.dxr / 00003_pick me.ls < prev    next >
Encoding:
Text File  |  2000-06-01  |  1.5 KB  |  55 lines

  1. on mouseEnter me
  2.   if marker(0) = label("play") then
  3.     whichSprite = me.spriteNum
  4.     set the cursor of sprite whichSprite to 280
  5.   end if
  6. end
  7.  
  8. on beginSprite me
  9.   sprite(me.spriteNum).cursor = 280
  10. end
  11.  
  12. on endSprite me
  13.   sprite(me.spriteNum).cursor = 0
  14. end
  15.  
  16. on mouseDown me
  17.   global gGameSol, gInactivities, gStartedPlaying, gNumberOfMovesLeft
  18.   if not ((marker(0) = label("lose")) or (marker(0) = label("win"))) then
  19.     whichSprite = me.spriteNum
  20.     gInactivities = VOID
  21.     gStartedPlaying = 1
  22.     if gGameSol = whichSprite then
  23.       whichBug = string(random(2))
  24.       set the member of sprite whichSprite to "bug" & whichBug
  25.       sprite(26).member = "legs"
  26.       sprite(26).locH = sprite(whichSprite).locH
  27.       sprite(26).locV = sprite(whichSprite).locV
  28.       sprite(whichSprite).cursor = 0
  29.       if sprite(23).memberNum > 0 then
  30.         if "29,30" contains string(gGameSol) then
  31.           sprite(23).member = "tree_uc"
  32.         else
  33.           sprite(23).member = "tree_smile"
  34.         end if
  35.         sprite(23).nextExpressionTime = -1
  36.       end if
  37.       puppetSound("66_caught0" & string(random(2)))
  38.       if marker(0) < label("glinda_demo") then
  39.         go("win")
  40.       else
  41.         go(the frame + 1)
  42.       end if
  43.     else
  44.       puppetSound("66_wrong0" & string(random(2)))
  45.       gNumberOfMovesLeft = gNumberOfMovesLeft - 1
  46.       if gNumberOfMovesLeft = 0 then
  47.         sprite(26).member = "bug_drop.01"
  48.         sprite(26).locH = sprite(gGameSol).locH
  49.         sprite(26).locV = sprite(gGameSol).locV
  50.         go("lose")
  51.       end if
  52.     end if
  53.   end if
  54. end
  55.